<template>
  <div class="card-container">
    <!-- 搜索区域 -->
    <div class="search-container">
      <span class="search-label">一体杆名称：</span>
      <el-input clearable placeholder="请输入内容" class="search-main" />

      <span class="search-label">一体杆编号：</span>
      <el-input clearable placeholder="请输入内容" class="search-main" />
      <span class="search-label">运行状态：</span>
      <el-select>
        <el-option v-for="item in []" :key="item.id" />
      </el-select>
      <el-button type="primary" class="search-btn">查询</el-button>
    </div>
    <!-- 新增删除操作区域 -->
    <div class="create-container">
      <el-button type="primary">添加一体杆</el-button>
      <el-button>批量删除</el-button>

    </div>
    <!-- 表格区域 -->
    <div class="table">
      <el-table style="width: 100%" :data="[]">
        <el-table-column type="index" label="序号" />
        <el-table-column label="一体杆名称" />
        <el-table-column label="一体杆编号" />
        <el-table-column label="一体杆IP" />
        <el-table-column label="安装区域" />
        <el-table-column label="一体杆类型" />
        <el-table-column label="运行状态" />
        <el-table-column label="操作" fixed="right" width="180">
          <template #default="scope">

            <el-button size="mini" type="text">编辑</el-button>
            <el-button size="mini" type="text">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div class="page-container">
      <el-pagination
        layout="total, prev, pager, next"
        :total="0"
      />
    </div>
    <!-- 添加楼宇 -->
    <el-dialog
      title="添加楼宇"
      width="580px"
    >
      <!-- 表单接口 -->
      <div class="form-container">
        <!-- <el-form ref="addForm" :model="addForm" :rules="addFormRules">
          <el-form-item label="楼宇名称" prop="name">
            <el-input v-model="addForm.name" />
          </el-form-item>
          <el-form-item label="楼宇层数" prop="floors">
            <el-input v-model="addForm.floors" />
          </el-form-item>
          <el-form-item label="在管面积" prop="area">
            <el-input v-model="addForm.area" />
          </el-form-item>
          <el-form-item label="物业费" prop="propertyFeePrice">
            <el-input v-model="addForm.propertyFeePrice" />
          </el-form-item>
        </el-form> -->
      </div>
      <template #footer>
        <el-button size="mini">取 消</el-button>
        <el-button size="mini" type="primary">确 定</el-button>
      </template>
    </el-dialog>
    <br>
  </div>
</template>

<script>
import { getPoleListAPI } from '@/api/rodmanage'

export default {
  data() {
    return {
      params: {
        page: 1,
        pageSize: 10,
        poleName: '', // 一体杆名称
        poleNumber: '', // 一体杆编号
        poleStatus: '' // 运行状态
      }
    }
  },
  created() {
    this.getPoleList()
  },
  methods: {
    async getPoleList() {
      console.log(1)
      const res = await getPoleListAPI(this.params)
      console.log(res)
    }
  }
}
</script>

<style lang="scss" scoped>
.card-container {
  padding: 20px;
  background-color: #fff;
}

.search-container {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgb(237, 237, 237, .9);
  padding-bottom: 20px;
  .search-main {
    width: 220px;
    margin-right: 10px;
  }
  .search-btn{
    margin-left:20px;
  }
}
.create-container{
  margin: 10px 0px;
}
.page-container{
  padding:4px 0px;
  text-align: right;
}
.form-container{
  padding:0px 80px;
}
</style>
